<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Changes the size of an image</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.thresholdimage.html">Imagick::thresholdImage</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.tintimage.html">Imagick::tintImage</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="imagick.thumbnailimage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::thumbnailImage</h1>
  <p class="verinfo">(PECL imagick 2.0.0)</p><p class="refpurpose"><span class="refname">Imagick::thumbnailImage</span> &mdash; <span class="dc-title">Changes the size of an image</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.thumbnailimage-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>Imagick::thumbnailImage</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$columns</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$rows</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$bestfit</code><span class="initializer"> = false</span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$fill</code><span class="initializer"> = false</span></span>
  ]] )</div>

  <p class="para rdfs-comment">
   Changes the size of an image to the given dimensions and removes any
   associated profiles. The goal is to produce small low cost thumbnail
   images suited for display on the Web. 

   If <strong><code>TRUE</code></strong> is given as a third parameter then columns and rows parameters
   are used as maximums for each side. Both sides will be scaled down until
   the match or are smaller than the parameter given for the side.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
<span class="simpara">
 参数 <em><code class="parameter">bestfit</code></em> 的特性在 Imagick 3.0.0 中已改变。在此版本以前，当目标尺寸设为
 400x400 时，原尺寸为 200x150 的图像将不会被改变。自 Imagick 3.0.0
 起，源图像将会被放大到 400x300 因为这将更好的适合目标尺寸。当使用参数
 <em><code class="parameter">bestfit</code></em> 时，必须同时给出宽度和高度。
</span>
</p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.thumbnailimage-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">columns</code></em></dt>

     <dd>

      <p class="para">
      Image width
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">rows</code></em></dt>

     <dd>

      <p class="para">
      Image height
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">bestfit</code></em></dt>

     <dd>

      <p class="para">
      Whether to force maximum values
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.thumbnailimage-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-imagick.thumbnailimage-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   错误时抛出 ImagickException。
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.thresholdimage.html">Imagick::thresholdImage</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.tintimage.html">Imagick::tintImage</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
